package com.tyx.chargingpile.service;

import com.tyx.chargingpile.vo.SocketResponseResult;
import io.netty.channel.ChannelHandlerContext;

import java.util.Map;

/**
 * 充电桩业务接口
 */
public interface ChargingPileService {

    /**
     * 处理报文并返回
     * @param channelHandlerContext socket通道上下文
     * @param context 报文内容
     */
    SocketResponseResult execute(ChannelHandlerContext channelHandlerContext, byte[] context) throws Exception;

    /**
     * 处理后台业务，返回报文给电桩
     * @param channelHandlerContext
     * @param data
     * @return
     * @throws Exception
     */
    SocketResponseResult execute(ChannelHandlerContext channelHandlerContext, Map data) throws Exception;
}
